import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)
const store = new Vuex.Store({
    state(){
        return {
            userInfo:null
        }
    },
    mutations:{
        updateUserInfo: (state, userInfo)=>{
            state.userInfo = userInfo;
            sessionStorage.setItem('userInfo',JSON.stringify(userInfo))
        }
    }
})

export default store;